package com.zhp.fs.service;

import com.zhp.fs.dao.UserDao;
import com.zhp.fs.pojo.entity.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * 说明：
 * <p>
 * 作者： fwj
 * <p>
 * 时间： 2017/7/29  9:48
 */
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public int addUser(UserEntity userEntity) {
        userEntity.setUpdateTime(System.currentTimeMillis());
        userEntity.setCreateTime(System.currentTimeMillis());
        return userDao.insertUser(userEntity);
    }
}
